<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<th:block th:include="include ::header('用户添加')"/>
	<th:block th:include="include ::datetimepicker-css"/>
</head>
<body>
<div class="panel-default panel">
	<div class="panel-heading">
		<h4 class="panel-title">
			<a href="#dqpb" data-toggle="collapse" data-parent="#accordion">添加页面</a></h4>
	</div>
	<div id="dqpb" class="panel-collapse collapse">
		<div class="panel-body">
			<div class="row">
				<div class="col-sm-6">
					<div class="ibox float-e-margins">
						<div class="ibox-title">
							<h5>添加</h5>
						</div>
						<div class="ibox-content">
							<form class="form-horizontal m-t" id="commentForm" th:action="@{/crud/user}" method="post">
								<div class="form-group">
									<label class="col-sm-3 control-label">姓名：</label>
									<div class="col-sm-8">
										<input id="cname" name="name" minlength="2" type="text" class="form-control"
										       required>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label">ID：</label>
									<div class="col-sm-8">
										<input id="cemail" type="number" class="form-control" name="id" required>
									</div>
								</div>
								<div class="form-group">
									<label class="font-noraml">性别:</label>
									<div class="radio">
										<label>
											<input type="radio" checked="" value="option1" id="optionsRadios1"
											       name="gender" th:value="1">男</label>
										<label>
											<input type="radio" value="option2" id="optionsRadios2" name="gender"
											       th:value="0">女</label>
									</div>
								</div>

								<div class="form-group">
									<label class="font-noraml">生日:</label>
									<div class="input-group date">
										<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
										<input type="date" class="form-control" id="datetimepicker-demo-2" name="birth"
										       placeholder="yyyy-MM-dd">
									</div>
								</div>
								<div class="form-group">
									<label class="font-noraml">部门:</label>
									<select class="form-control" th:name="departmentDO.id">
										<option th:each="dept:${depts}" th:text="${dept.name}"
										        th:value="${dept.id}"></option>
									</select>
								</div>
								<div class="form-group">
									<div class="col-sm-4 col-sm-offset-3  right-arrow">
										<button class="btn btn-primary " type="submit">提交</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    $(function () {

        $("#datetimepicker-demo-2").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    })
</script>

</body>
</html>